package com.pan.api.entity;

import java.util.ArrayList;
import java.util.List;

public class MethodInformation extends com.pan.api.entity.CommentInformation {

    boolean isJsonXml;
    String[] requestType;//request method:
    String url;
    List<com.pan.api.entity.ArgumentInformation> argList;
    String methodName;
    Class<?> returnType;

    public Class<?> getReturnType() {
        return returnType;
    }

    public void setReturnType(Class<?> returnType) {
        this.returnType = returnType;
    }

    public String[] getRequestType() {
        return requestType;
    }

    public void setRequestType(String[] requestType) {
        this.requestType = requestType;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public List<com.pan.api.entity.ArgumentInformation> getArgList() {
        return argList;
    }

    public void setArgList(List<com.pan.api.entity.ArgumentInformation> argList) {
        this.argList = argList;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public boolean isJsonXml() {
        return isJsonXml;
    }

    public void setJsonXml(boolean jsonXml) {
        isJsonXml = jsonXml;
    }

    public void addArg(com.pan.api.entity.ArgumentInformation argumentInformation){
        if (
            this.argList == null
        ) this.argList = new ArrayList<>();
        argList.add(argumentInformation);
    }
}
